package com.putprize.semantic;

import java.io.Serializable;
import java.util.Properties;

import org.apache.log4j.Logger;

import edu.stanford.nlp.tagger.maxent.MaxentTagger;

public class SemanticPoser implements Serializable {

	private static final long serialVersionUID = 3818012000074973933L;
	
	private static final Logger _log = Logger.getLogger(SemanticPoser.class);
	
	private MaxentTagger mt;
	
	public SemanticPoser(Properties prop) {
		
		_log.info("Init STANFORD POS TAGGER");
		
		String location = prop.getProperty("LOCATION_POS_MODEL");
		mt = new MaxentTagger(location);
		
		_log.info("Init Done");
	}
	
	public String process(String text){
		return mt.tagTokenizedString(text);
	}

}

